<?php

namespace app\api\model;

use common\model\base\BaseModel;
use common\traits\InstanceTrait;

/**
 * Class Member
 * @package app\api\model
 */
class Admin extends BaseModel
{
    use InstanceTrait;
    protected $pk = 'admin_id';

    public function getByPhone($phone)
    {
        return $this->where('phone', $phone)->find();
    }

    public function getByOpenid($openid)
    {
        return $this->where('openid', $openid)->find();
    }


}
